Cards v3 Direct API Integration
Introduction
For V3 of Direct Card payments we have simplified the flow from 3 api calls down to 1 API call.
All payments are 3D secure processed. When a redirect is required to complete the payment this will be returned in the API response.
Direct API integration
The Cards v3 only needs the following call to be done with the attached mandatory parameters:
The notifciation URL can be set per transaction or set to a controller on your integration side If at any point not all the required data is received a dynamic page is returned to request the missing data from the end user.
Read more about the Recommended and optional parameters here.
The endpoint needed to be called in TEST is: https://api.test.cyberpay.link/v3/payment
The endpoint needed to be called in PROD is: https://api.cyberpay.link/v3/payment
Within the header the X-API-KEY needs to be passed; This will have been provided by the onBoarding team. If you have not been givin a X-API-KEY please reach out on [email protected]
To assist you can also see the following Postman to assist with the integration: https://www.postman.com/kashatech/workspace/kashatech-public-api/request/24941176-800f3d77-ffbd-4ce8-9558-728328ec2b59?tab=body
{
"paymentOptionId": "4864ab16-2fa4-464a-b692-a74cab45aaf8",
"country": "DE",
"currency": "EUR",
"amount": 25,
"redirectUrl": "https://merchant.io/where-to-go",
"notificationUrl": "https://en95b1x36q7ek.x.pipedream.net/",
"paymentData": {
"cardNumber": "4242424242424242",
"expiryYear": "2029",
"expiryMonth": "04",
"cardCvv": "728",
"cardHolder": "John Bonham"
},
"customer": {
"firstName": "John",
"lastName": "Bonham",
"email": "[email protected]",
"phone": "+25412340000",
"userDevice": "MOBILE",
"userAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36",
"ip": "84.232.140.77",
"address": {
"street": "32 Main Gardens",
"streetNumber": "24",
"zipCode":"10115",
"city": "Berlin",
"country": "DE",
"state": "Berlin"
}
},
"language": "EN",
"paymentReference": "Invoice ABC123",
"userId": "Merch_User_123",
"extra1": "extraData001",
"extra2": "extraData002",
"extra3": "extraData003"
}
If all data is correctly passsed a 3D secure redirect URL will be returned.
Redirect
{
"statusCode": 300,
"resultType": "redirect",
"result": {
"redirectUrl": "https://cashier.cyberpay.link/redirect/bb027cd1-a364-4cbe-a317-bbfad405897b",
"status": "PROCESSING",
"currency": "EUR",
"amount": 205,
"merchantReference": "mr-t88tdi3gogt1g3i",
"transactionId": "f07896e2f4-e209-4d57-87ad-5d0dbf77dadf"
}
}
If at any point not all the required data is received a dynamic page is returned to request the missing data from the end user.
Redirect
{
"statusCode": 300,
"resultType": "redirect",
"result": {
"transactionId": "c19d8aae-6563-452a-a58b-2474bd696e99",
"merchantReference": "mr-3kzm9zaz3gvzlhv",
"currency": "EUR",
"amount": 250,
"status": "INIT",
"redirectUrl": "https://cashier.cyberpay.link/customer-data/c19d8aae-6563-452a-a58b-2474bd696e99/po/4864ab16-2fa4-464a-b692-a74cab45aaf8"
}
}